package tss.dsp;

import java.util.*;
import tss.*;

public class Snapshot {
	private Map<Integer, Object> states;
	private Collection<Message> unreceivedMessages;

	public Snapshot(Map<Integer, Object> states,
			Collection<Message> unreceivedMessages) {
		if (states == null)
			states = new Hashtable<Integer, Object>();
		if (unreceivedMessages == null)
			unreceivedMessages = new ArrayList<Message>();

		this.states = Collections.unmodifiableMap(states);
		this.unreceivedMessages = Collections
				.unmodifiableCollection(unreceivedMessages);
	}

	public Map<Integer, Object> getStates() {
		return states;
	}

	public Collection<Message> getUnreceivedMessages() {
		return unreceivedMessages;
	}
}
